import axios from '@/libs/axios1';
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' };
let baseUrl = '/scientific/environment';

// 获取已归档的科研项目
export const getContentFileList = (params) => {
    return axios({
        url: `${baseUrl}/page`,
        method: 'GET',
        params,
        headers: jsonHeaders
    });
};

// 部署科研工程
export const deployScientificProject = (data) => {
    return axios({
        url: `${baseUrl}/create`,
        method: 'POST',
        data,
        headers: jsonHeaders
    });
};

// 销毁科研工程
export const destroyScientificProject = (projectId) => {
    return axios({
        url: `${baseUrl}/destroy/${projectId}`,
        method: 'DELETE',
        headers: jsonHeaders
    });
};

// 查询科研工程的部署进度
export const queryDeployProgress = (projectId, contentId) => {
    return axios({
        url: `${baseUrl}/progress/${projectId}`,
        method: 'GET',
        params: {
            contentId
        },
        headers: jsonHeaders
    });
};

// 查询科研工程的自动销毁时间毫秒值
export const queryDestroyTime = (projectId) => {
    return axios({
        url: `${baseUrl}/selectTime/${projectId}`,
        method: 'GET',
        headers: jsonHeaders
    });
};

// 查询当前设计师科研部署状态
export const selectStatus = (contentId) => {
    return axios({
        url: `${baseUrl}/selectStatus/${contentId}`,
        method: 'GET',
        headers: jsonHeaders
    });
};
